import { ITravelStrategy } from "./Interface";
// 具体的策略

export class BusStarategy implements ITravelStrategy {
    calcFee(distance: number): number {
        return distance < 10 ? 4 : 6;
    }

}



export class TaiStrategy implements ITravelStrategy {
    calcFee(distance: number): number {
        return distance < 3 ? 8 : 8 * (distance - 3) * 3;
    }
}





